﻿import lite.mobile.lib.components.skin.UStateButtonSkin;
import lite.mobile.lib.components.skin.UButtonSkin;
import lite.mobile.lib.components.skin.ISkin;
import lite.mobile.lib.components.skin.ICollectionSkin;

/**
 * @author alibber
 */
class lite.mobile.lib.components.skin.CollectionSkins implements ICollectionSkin {

	
	private static var instance : CollectionSkins;

	public static function getInstance() : CollectionSkins {
		if (instance == null) {
			trace("~~~~~~~~~~~");
			instance = new CollectionSkins();
			instance.$_initSkin();
		}
		return instance;
	}

	// 获取skin
	public function getSkin(type : String) : ISkin {
		var isk : ISkin = this[type];
		return isk;
	}

	private var UButton; 
	private var UTextButton; 
	private var UImageButton; 
	private var UStateButton; 

	public function $_initSkin() : Void {
		UButton = new UButtonSkin("ButtonSkin"); 
		UTextButton = new UButtonSkin("ButtonSkin"); 
		UImageButton = new UButtonSkin("ButtonSkin"); 
		 UStateButton = new UStateButtonSkin("StateButtonSkin"); 
		trace(UButton);
	}
}
